import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/task/base_danger_investigation_info_entity.dart';

BaseDangerInvestigationInfoEntity $BaseDangerInvestigationInfoEntityFromJson(Map<String, dynamic> json) {
  final BaseDangerInvestigationInfoEntity baseDangerInvestigationInfoEntity = BaseDangerInvestigationInfoEntity();
  final String? checkAcceptComment = jsonConvert.convert<String>(json['checkAcceptComment']);
  if (checkAcceptComment != null) {
    baseDangerInvestigationInfoEntity.checkAcceptComment = checkAcceptComment;
  }
  final List<String>? checkAcceptImages = (json['checkAcceptImages'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (checkAcceptImages != null) {
    baseDangerInvestigationInfoEntity.checkAcceptImages = checkAcceptImages;
  }
  final String? checkAcceptPerson = jsonConvert.convert<String>(json['checkAcceptPerson']);
  if (checkAcceptPerson != null) {
    baseDangerInvestigationInfoEntity.checkAcceptPerson = checkAcceptPerson;
  }
  final String? checkAcceptTime = jsonConvert.convert<String>(json['checkAcceptTime']);
  if (checkAcceptTime != null) {
    baseDangerInvestigationInfoEntity.checkAcceptTime = checkAcceptTime;
  }
  final String? checkAcceptUserId = jsonConvert.convert<String>(json['checkAcceptUserId']);
  if (checkAcceptUserId != null) {
    baseDangerInvestigationInfoEntity.checkAcceptUserId = checkAcceptUserId;
  }
  final String? checkAcceptUserPhone = jsonConvert.convert<String>(json['checkAcceptUserPhone']);
  if (checkAcceptUserPhone != null) {
    baseDangerInvestigationInfoEntity.checkAcceptUserPhone = checkAcceptUserPhone;
  }
  final String? confirmBy = jsonConvert.convert<String>(json['confirmBy']);
  if (confirmBy != null) {
    baseDangerInvestigationInfoEntity.confirmBy = confirmBy;
  }
  final String? confirmDate = jsonConvert.convert<String>(json['confirmDate']);
  if (confirmDate != null) {
    baseDangerInvestigationInfoEntity.confirmDate = confirmDate;
  }
  final String? confirmUserId = jsonConvert.convert<String>(json['confirmUserId']);
  if (confirmUserId != null) {
    baseDangerInvestigationInfoEntity.confirmUserId = confirmUserId;
  }
  final String? confirmUserPhone = jsonConvert.convert<String>(json['confirmUserPhone']);
  if (confirmUserPhone != null) {
    baseDangerInvestigationInfoEntity.confirmUserPhone = confirmUserPhone;
  }
  final String? controlMeasures = jsonConvert.convert<String>(json['controlMeasures']);
  if (controlMeasures != null) {
    baseDangerInvestigationInfoEntity.controlMeasures = controlMeasures;
  }
  final String? cost = jsonConvert.convert<String>(json['cost']);
  if (cost != null) {
    baseDangerInvestigationInfoEntity.cost = cost;
  }
  final String? currentRiskLevel = jsonConvert.convert<String>(json['currentRiskLevel']);
  if (currentRiskLevel != null) {
    baseDangerInvestigationInfoEntity.currentRiskLevel = currentRiskLevel;
  }
  final String? initialRiskLevel = jsonConvert.convert<String>(json['initialRiskLevel']);
  if (initialRiskLevel != null) {
    baseDangerInvestigationInfoEntity.initialRiskLevel = initialRiskLevel;
  }
  final String? dangerDesc = jsonConvert.convert<String>(json['dangerDesc']);
  if (dangerDesc != null) {
    baseDangerInvestigationInfoEntity.dangerDesc = dangerDesc;
  }
  final List<String>? dangerImages = (json['dangerImages'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (dangerImages != null) {
    baseDangerInvestigationInfoEntity.dangerImages = dangerImages;
  }
  final String? dangerLevel = jsonConvert.convert<String>(json['dangerLevel']);
  if (dangerLevel != null) {
    baseDangerInvestigationInfoEntity.dangerLevel = dangerLevel;
  }
  final String? dangerLevelDicId = jsonConvert.convert<String>(json['dangerLevelDicId']);
  if (dangerLevelDicId != null) {
    baseDangerInvestigationInfoEntity.dangerLevelDicId = dangerLevelDicId;
  }
  final String? dangerManageDeadline = jsonConvert.convert<String>(json['dangerManageDeadline']);
  if (dangerManageDeadline != null) {
    baseDangerInvestigationInfoEntity.dangerManageDeadline = dangerManageDeadline;
  }
  final String? dangerManageType = jsonConvert.convert<String>(json['dangerManageType']);
  if (dangerManageType != null) {
    baseDangerInvestigationInfoEntity.dangerManageType = dangerManageType;
  }
  final String? dangerManageTypeDicId = jsonConvert.convert<String>(json['dangerManageTypeDicId']);
  if (dangerManageTypeDicId != null) {
    baseDangerInvestigationInfoEntity.dangerManageTypeDicId = dangerManageTypeDicId;
  }
  final String? dangerName = jsonConvert.convert<String>(json['dangerName']);
  if (dangerName != null) {
    baseDangerInvestigationInfoEntity.dangerName = dangerName;
  }
  final String? dangerReason = jsonConvert.convert<String>(json['dangerReason']);
  if (dangerReason != null) {
    baseDangerInvestigationInfoEntity.dangerReason = dangerReason;
  }
  final String? dangerRecordDesc = jsonConvert.convert<String>(json['dangerRecordDesc']);
  if (dangerRecordDesc != null) {
    baseDangerInvestigationInfoEntity.dangerRecordDesc = dangerRecordDesc;
  }
  final String? dangerSrc = jsonConvert.convert<String>(json['dangerSrc']);
  if (dangerSrc != null) {
    baseDangerInvestigationInfoEntity.dangerSrc = dangerSrc;
  }
  final String? dangerSrcDicId = jsonConvert.convert<String>(json['dangerSrcDicId']);
  if (dangerSrcDicId != null) {
    baseDangerInvestigationInfoEntity.dangerSrcDicId = dangerSrcDicId;
  }
  final String? dangerState = jsonConvert.convert<String>(json['dangerState']);
  if (dangerState != null) {
    baseDangerInvestigationInfoEntity.dangerState = dangerState;
  }
  final List<String>? dangerVideo = (json['dangerVideo'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (dangerVideo != null) {
    baseDangerInvestigationInfoEntity.dangerVideo = dangerVideo;
  }
  final List<String>? dangerVoice = (json['dangerVoice'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (dangerVoice != null) {
    baseDangerInvestigationInfoEntity.dangerVoice = dangerVoice;
  }
  final String? hazardCategory = jsonConvert.convert<String>(json['hazardCategory']);
  if (hazardCategory != null) {
    baseDangerInvestigationInfoEntity.hazardCategory = hazardCategory;
  }
  final String? hazardCategoryDicId = jsonConvert.convert<String>(json['hazardCategoryDicId']);
  if (hazardCategoryDicId != null) {
    baseDangerInvestigationInfoEntity.hazardCategoryDicId = hazardCategoryDicId;
  }
  final String? hazardDangerType = jsonConvert.convert<String>(json['hazardDangerType']);
  if (hazardDangerType != null) {
    baseDangerInvestigationInfoEntity.hazardDangerType = hazardDangerType;
  }
  final String? hazardDangerTypeDicId = jsonConvert.convert<String>(json['hazardDangerTypeDicId']);
  if (hazardDangerTypeDicId != null) {
    baseDangerInvestigationInfoEntity.hazardDangerTypeDicId = hazardDangerTypeDicId;
  }
  final String? hazardDep = jsonConvert.convert<String>(json['hazardDep']);
  if (hazardDep != null) {
    baseDangerInvestigationInfoEntity.hazardDep = hazardDep;
  }
  final String? hazardLiablePerson = jsonConvert.convert<String>(json['hazardLiablePerson']);
  if (hazardLiablePerson != null) {
    baseDangerInvestigationInfoEntity.hazardLiablePerson = hazardLiablePerson;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    baseDangerInvestigationInfoEntity.id = id;
  }
  final int? initialRiskConsequences = jsonConvert.convert<int>(json['initialRiskConsequences']);
  if (initialRiskConsequences != null) {
    baseDangerInvestigationInfoEntity.initialRiskConsequences = initialRiskConsequences;
  }
  final int? initialRiskDegree = jsonConvert.convert<int>(json['initialRiskDegree']);
  if (initialRiskDegree != null) {
    baseDangerInvestigationInfoEntity.initialRiskDegree = initialRiskDegree;
  }
  final int? initialRiskPossibility = jsonConvert.convert<int>(json['initialRiskPossibility']);
  if (initialRiskPossibility != null) {
    baseDangerInvestigationInfoEntity.initialRiskPossibility = initialRiskPossibility;
  }
  final String? liableDate = jsonConvert.convert<String>(json['liableDate']);
  if (liableDate != null) {
    baseDangerInvestigationInfoEntity.liableDate = liableDate;
  }
  final String? liableDesc = jsonConvert.convert<String>(json['liableDesc']);
  if (liableDesc != null) {
    baseDangerInvestigationInfoEntity.liableDesc = liableDesc;
  }
  final List<String>? liableImages = (json['liableImages'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (liableImages != null) {
    baseDangerInvestigationInfoEntity.liableImages = liableImages;
  }
  final String? liablePerson = jsonConvert.convert<String>(json['liablePerson']);
  if (liablePerson != null) {
    baseDangerInvestigationInfoEntity.liablePerson = liablePerson;
  }
  final String? liableUserId = jsonConvert.convert<String>(json['liableUserId']);
  if (liableUserId != null) {
    baseDangerInvestigationInfoEntity.liableUserId = liableUserId;
  }
  final String? liableUserPhone = jsonConvert.convert<String>(json['liableUserPhone']);
  if (liableUserPhone != null) {
    baseDangerInvestigationInfoEntity.liableUserPhone = liableUserPhone;
  }
  final String? registTime = jsonConvert.convert<String>(json['registTime']);
  if (registTime != null) {
    baseDangerInvestigationInfoEntity.registTime = registTime;
  }
  final String? registrant = jsonConvert.convert<String>(json['registrant']);
  if (registrant != null) {
    baseDangerInvestigationInfoEntity.registrant = registrant;
  }
  final String? registrantUserId = jsonConvert.convert<String>(json['registrantUserId']);
  if (registrantUserId != null) {
    baseDangerInvestigationInfoEntity.registrantUserId = registrantUserId;
  }
  final String? registrantUserPhone = jsonConvert.convert<String>(json['registrantUserPhone']);
  if (registrantUserPhone != null) {
    baseDangerInvestigationInfoEntity.registrantUserPhone = registrantUserPhone;
  }
  final String? riskDescription = jsonConvert.convert<String>(json['riskDescription']);
  if (riskDescription != null) {
    baseDangerInvestigationInfoEntity.riskDescription = riskDescription;
  }
  final String? riskEventName = jsonConvert.convert<String>(json['riskEventName']);
  if (riskEventName != null) {
    baseDangerInvestigationInfoEntity.riskEventName = riskEventName;
  }
  final String? riskMeasureDesc = jsonConvert.convert<String>(json['riskMeasureDesc']);
  if (riskMeasureDesc != null) {
    baseDangerInvestigationInfoEntity.riskMeasureDesc = riskMeasureDesc;
  }
  final String? riskObjectName = jsonConvert.convert<String>(json['riskObjectName']);
  if (riskObjectName != null) {
    baseDangerInvestigationInfoEntity.riskObjectName = riskObjectName;
  }
  final String? riskObjectId = jsonConvert.convert<String>(json['riskObjectId']);
  if (riskObjectId != null) {
    baseDangerInvestigationInfoEntity.riskObjectId = riskObjectId;
  }
  final String? riskUnitName = jsonConvert.convert<String>(json['riskUnitName']);
  if (riskUnitName != null) {
    baseDangerInvestigationInfoEntity.riskUnitName = riskUnitName;
  }
  final String? troubleshootContent = jsonConvert.convert<String>(json['troubleshootContent']);
  if (troubleshootContent != null) {
    baseDangerInvestigationInfoEntity.troubleshootContent = troubleshootContent;
  }
  return baseDangerInvestigationInfoEntity;
}

Map<String, dynamic> $BaseDangerInvestigationInfoEntityToJson(BaseDangerInvestigationInfoEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['checkAcceptComment'] = entity.checkAcceptComment;
  data['checkAcceptImages'] = entity.checkAcceptImages;
  data['checkAcceptPerson'] = entity.checkAcceptPerson;
  data['checkAcceptTime'] = entity.checkAcceptTime;
  data['checkAcceptUserId'] = entity.checkAcceptUserId;
  data['checkAcceptUserPhone'] = entity.checkAcceptUserPhone;
  data['confirmBy'] = entity.confirmBy;
  data['confirmDate'] = entity.confirmDate;
  data['confirmUserId'] = entity.confirmUserId;
  data['confirmUserPhone'] = entity.confirmUserPhone;
  data['controlMeasures'] = entity.controlMeasures;
  data['cost'] = entity.cost;
  data['currentRiskLevel'] = entity.currentRiskLevel;
  data['initialRiskLevel'] = entity.initialRiskLevel;
  data['dangerDesc'] = entity.dangerDesc;
  data['dangerImages'] = entity.dangerImages;
  data['dangerLevel'] = entity.dangerLevel;
  data['dangerLevelDicId'] = entity.dangerLevelDicId;
  data['dangerManageDeadline'] = entity.dangerManageDeadline;
  data['dangerManageType'] = entity.dangerManageType;
  data['dangerManageTypeDicId'] = entity.dangerManageTypeDicId;
  data['dangerName'] = entity.dangerName;
  data['dangerReason'] = entity.dangerReason;
  data['dangerRecordDesc'] = entity.dangerRecordDesc;
  data['dangerSrc'] = entity.dangerSrc;
  data['dangerSrcDicId'] = entity.dangerSrcDicId;
  data['dangerState'] = entity.dangerState;
  data['dangerVideo'] = entity.dangerVideo;
  data['dangerVoice'] = entity.dangerVoice;
  data['hazardCategory'] = entity.hazardCategory;
  data['hazardCategoryDicId'] = entity.hazardCategoryDicId;
  data['hazardDangerType'] = entity.hazardDangerType;
  data['hazardDangerTypeDicId'] = entity.hazardDangerTypeDicId;
  data['hazardDep'] = entity.hazardDep;
  data['hazardLiablePerson'] = entity.hazardLiablePerson;
  data['id'] = entity.id;
  data['initialRiskConsequences'] = entity.initialRiskConsequences;
  data['initialRiskDegree'] = entity.initialRiskDegree;
  data['initialRiskPossibility'] = entity.initialRiskPossibility;
  data['liableDate'] = entity.liableDate;
  data['liableDesc'] = entity.liableDesc;
  data['liableImages'] = entity.liableImages;
  data['liablePerson'] = entity.liablePerson;
  data['liableUserId'] = entity.liableUserId;
  data['liableUserPhone'] = entity.liableUserPhone;
  data['registTime'] = entity.registTime;
  data['registrant'] = entity.registrant;
  data['registrantUserId'] = entity.registrantUserId;
  data['registrantUserPhone'] = entity.registrantUserPhone;
  data['riskDescription'] = entity.riskDescription;
  data['riskEventName'] = entity.riskEventName;
  data['riskMeasureDesc'] = entity.riskMeasureDesc;
  data['riskObjectName'] = entity.riskObjectName;
  data['riskObjectId'] = entity.riskObjectId;
  data['riskUnitName'] = entity.riskUnitName;
  data['troubleshootContent'] = entity.troubleshootContent;
  return data;
}

extension BaseDangerInvestigationInfoEntityExtension on BaseDangerInvestigationInfoEntity {
  BaseDangerInvestigationInfoEntity copyWith({
    String? checkAcceptComment,
    List<String>? checkAcceptImages,
    String? checkAcceptPerson,
    String? checkAcceptTime,
    String? checkAcceptUserId,
    String? checkAcceptUserPhone,
    String? confirmBy,
    String? confirmDate,
    String? confirmUserId,
    String? confirmUserPhone,
    String? controlMeasures,
    String? cost,
    String? currentRiskLevel,
    String? initialRiskLevel,
    String? dangerDesc,
    List<String>? dangerImages,
    String? dangerLevel,
    String? dangerLevelDicId,
    String? dangerManageDeadline,
    String? dangerManageType,
    String? dangerManageTypeDicId,
    String? dangerName,
    String? dangerReason,
    String? dangerRecordDesc,
    String? dangerSrc,
    String? dangerSrcDicId,
    String? dangerState,
    List<String>? dangerVideo,
    List<String>? dangerVoice,
    String? hazardCategory,
    String? hazardCategoryDicId,
    String? hazardDangerType,
    String? hazardDangerTypeDicId,
    String? hazardDep,
    String? hazardLiablePerson,
    String? id,
    int? initialRiskConsequences,
    int? initialRiskDegree,
    int? initialRiskPossibility,
    String? liableDate,
    String? liableDesc,
    List<String>? liableImages,
    String? liablePerson,
    String? liableUserId,
    String? liableUserPhone,
    String? registTime,
    String? registrant,
    String? registrantUserId,
    String? registrantUserPhone,
    String? riskDescription,
    String? riskEventName,
    String? riskMeasureDesc,
    String? riskObjectName,
    String? riskObjectId,
    String? riskUnitName,
    String? troubleshootContent,
  }) {
    return BaseDangerInvestigationInfoEntity()
      ..checkAcceptComment = checkAcceptComment ?? this.checkAcceptComment
      ..checkAcceptImages = checkAcceptImages ?? this.checkAcceptImages
      ..checkAcceptPerson = checkAcceptPerson ?? this.checkAcceptPerson
      ..checkAcceptTime = checkAcceptTime ?? this.checkAcceptTime
      ..checkAcceptUserId = checkAcceptUserId ?? this.checkAcceptUserId
      ..checkAcceptUserPhone = checkAcceptUserPhone ?? this.checkAcceptUserPhone
      ..confirmBy = confirmBy ?? this.confirmBy
      ..confirmDate = confirmDate ?? this.confirmDate
      ..confirmUserId = confirmUserId ?? this.confirmUserId
      ..confirmUserPhone = confirmUserPhone ?? this.confirmUserPhone
      ..controlMeasures = controlMeasures ?? this.controlMeasures
      ..cost = cost ?? this.cost
      ..currentRiskLevel = currentRiskLevel ?? this.currentRiskLevel
      ..initialRiskLevel = initialRiskLevel ?? this.initialRiskLevel
      ..dangerDesc = dangerDesc ?? this.dangerDesc
      ..dangerImages = dangerImages ?? this.dangerImages
      ..dangerLevel = dangerLevel ?? this.dangerLevel
      ..dangerLevelDicId = dangerLevelDicId ?? this.dangerLevelDicId
      ..dangerManageDeadline = dangerManageDeadline ?? this.dangerManageDeadline
      ..dangerManageType = dangerManageType ?? this.dangerManageType
      ..dangerManageTypeDicId = dangerManageTypeDicId ?? this.dangerManageTypeDicId
      ..dangerName = dangerName ?? this.dangerName
      ..dangerReason = dangerReason ?? this.dangerReason
      ..dangerRecordDesc = dangerRecordDesc ?? this.dangerRecordDesc
      ..dangerSrc = dangerSrc ?? this.dangerSrc
      ..dangerSrcDicId = dangerSrcDicId ?? this.dangerSrcDicId
      ..dangerState = dangerState ?? this.dangerState
      ..dangerVideo = dangerVideo ?? this.dangerVideo
      ..dangerVoice = dangerVoice ?? this.dangerVoice
      ..hazardCategory = hazardCategory ?? this.hazardCategory
      ..hazardCategoryDicId = hazardCategoryDicId ?? this.hazardCategoryDicId
      ..hazardDangerType = hazardDangerType ?? this.hazardDangerType
      ..hazardDangerTypeDicId = hazardDangerTypeDicId ?? this.hazardDangerTypeDicId
      ..hazardDep = hazardDep ?? this.hazardDep
      ..hazardLiablePerson = hazardLiablePerson ?? this.hazardLiablePerson
      ..id = id ?? this.id
      ..initialRiskConsequences = initialRiskConsequences ?? this.initialRiskConsequences
      ..initialRiskDegree = initialRiskDegree ?? this.initialRiskDegree
      ..initialRiskPossibility = initialRiskPossibility ?? this.initialRiskPossibility
      ..liableDate = liableDate ?? this.liableDate
      ..liableDesc = liableDesc ?? this.liableDesc
      ..liableImages = liableImages ?? this.liableImages
      ..liablePerson = liablePerson ?? this.liablePerson
      ..liableUserId = liableUserId ?? this.liableUserId
      ..liableUserPhone = liableUserPhone ?? this.liableUserPhone
      ..registTime = registTime ?? this.registTime
      ..registrant = registrant ?? this.registrant
      ..registrantUserId = registrantUserId ?? this.registrantUserId
      ..registrantUserPhone = registrantUserPhone ?? this.registrantUserPhone
      ..riskDescription = riskDescription ?? this.riskDescription
      ..riskEventName = riskEventName ?? this.riskEventName
      ..riskMeasureDesc = riskMeasureDesc ?? this.riskMeasureDesc
      ..riskObjectName = riskObjectName ?? this.riskObjectName
      ..riskObjectId = riskObjectId ?? this.riskObjectId
      ..riskUnitName = riskUnitName ?? this.riskUnitName
      ..troubleshootContent = troubleshootContent ?? this.troubleshootContent;
  }
}
